package com.meirengu.webview.service;

import com.meirengu.service.BaseService;
import com.meirengu.webview.model.User;

import java.math.BigDecimal;

/**
 * User服务接口
 *
 * @author
 * @create
 */
public interface InformationService extends BaseService<User> {


    boolean isExist(String mobile) throws Exception;

    boolean needSms(String mobile, BigDecimal money) throws Exception;

    boolean needSms(String mobile) throws Exception;

    User getByMobile(String mobile);

    /**
     * 注册 手机号 渠道号
     *
     * @param phone
     * @param cid
     * @return
     */
    public int signUp(String phone, String cid, String ip, String money) throws Exception;

    /**
     * 添加新手机号，渠道号，无金额
     */
    int signUp(String phone, String cid, String ip) throws Exception;

    /**
     * 更新用户信息
     *
     * @param phone
     * @param name
     * @param sex
     * @param city
     * @param birthday
     * @return
     * @throws Exception
     */
    public int updateUser(String phone, String name, Integer sex, String city, String birthday, String userAgent) throws Exception;


    /**
     * 添加userinfo
     *
     * @param phone
     * @param name
     * @param sex
     * @param city
     * @param areaCode
     * @param areaName
     * @param profession
     * @param socialSecurity
     * @param housingFund
     * @param birthday
     * @param income
     * @param insurance
     * @param housingType
     * @param hasCars
     * @param creditSituation
     * @param paytype
     * @param worklong
     * @param acceptsafety
     * @param lifeInsurance
     * @param isAtom
     * @param enpass
     * @return
     * @throws Exception
     */
    public int complement(String phone,
                          String name,
                          String sex,
                          String city,
                          String areaCode,
                          String areaName,
                          String profession,
                          String socialSecurity,
                          String housingFund,
                          String birthday,
                          String income,
                          String insurance,
                          String housingType,
                          String hasCars,
                          String creditSituation,
                          String paytype,
                          String worklong,
                          String acceptsafety,
                          String lifeInsurance,
                          String isAtom,
                          String enpass,
                          String ip,
                          String idCard) throws Exception;
}
